<?php

/* article/article.html */
class __TwigTemplate_6723ccd4f5e71934993a312110427d70aae273bfe59c644df71feacc737efd5d extends Twig_Template
{
    public function __construct(Twig_Environment $env)
    {
        parent::__construct($env);

        // line 1
        $this->parent = $this->loadTemplate("layout.html", "article/article.html", 1);
        $this->blocks = array(
            'web_title' => array($this, 'block_web_title'),
            'style' => array($this, 'block_style'),
            'content' => array($this, 'block_content'),
            'script' => array($this, 'block_script'),
        );
    }

    protected function doGetParent(array $context)
    {
        return "layout.html";
    }

    protected function doDisplay(array $context, array $blocks = array())
    {
        // line 2
        $context["now_title"] = "文章管理";
        // line 1
        $this->parent->display($context, array_merge($this->blocks, $blocks));
    }

    // line 3
    public function block_web_title($context, array $blocks = array())
    {
        echo twig_escape_filter($this->env, (isset($context["now_title"]) ? $context["now_title"] : null), "html", null, true);
        echo "-";
        $this->displayParentBlock("web_title", $context, $blocks);
    }

    // line 4
    public function block_style($context, array $blocks = array())
    {
        // line 5
        echo "    <link href=\"/assign/admin/js/DataTables/css/data-table.css\" rel=\"stylesheet\">
";
    }

    // line 7
    public function block_content($context, array $blocks = array())
    {
        // line 8
        echo "<div class=\"contentpanel\">
    <div class=\"row\">
        <div class=\"col-md-12\">
            <p class=\"mb20\">";
        // line 11
        echo twig_escape_filter($this->env, (isset($context["now_title"]) ? $context["now_title"] : null), "html", null, true);
        echo "</p>
            <div class=\"table-responsive\">
                <table class=\"table mb30\">
                    <thead>
                        <tr>
                            <th>ID</th>
                            <th>文章标题</th>
                            <th>所属分类</th>
                            <th>是否显示</th>
                            <th>修改时间</th>
                            <th>操作</th>
                        </tr>
                    </thead>
                    <tbody>
                        ";
        // line 25
        $context['_parent'] = $context;
        $context['_seq'] = twig_ensure_traversable((isset($context["data"]) ? $context["data"] : null));
        foreach ($context['_seq'] as $context["_key"] => $context["a"]) {
            // line 26
            echo "                        <tr>
                            <td>";
            // line 27
            echo twig_escape_filter($this->env, $this->getAttribute($context["a"], "id", array()), "html", null, true);
            echo "</td>
                            <td>";
            // line 28
            echo twig_escape_filter($this->env, $this->getAttribute($context["a"], "title", array()), "html", null, true);
            echo "</td>
                            <td>";
            // line 29
            echo twig_escape_filter($this->env, $this->getAttribute($context["a"], "cname", array()), "html", null, true);
            echo "</td>
                            <td>";
            // line 30
            echo ((($this->getAttribute($context["a"], "is_use", array()) == 0)) ? ("可用") : ("不可用"));
            echo "</td>
                            <td>";
            // line 31
            echo twig_escape_filter($this->env, twig_date_format_filter($this->env, $this->getAttribute($context["a"], "updattime", array())), "html", null, true);
            echo "</td>
                            <td class=\"table-action\">
                                <a href=\"/admin/article/infoarticle/id/";
            // line 33
            echo twig_escape_filter($this->env, $this->getAttribute($context["a"], "id", array()), "html", null, true);
            echo "\" title=\"編輯\"><i class=\"fa fa-pencil\"></i></a>
                                <a data-url=\"/admin/article/delarticle/id/";
            // line 34
            echo twig_escape_filter($this->env, $this->getAttribute($context["a"], "id", array()), "html", null, true);
            echo "\" href=\"javascript:;\" class=\"btn-del\" title=\"刪除\"><i class=\"fa fa-trash-o\"></i></a>
                            </td>
                        </tr>
                        ";
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_iterated'], $context['_key'], $context['a'], $context['_parent'], $context['loop']);
        $context = array_intersect_key($context, $_parent) + $_parent;
        // line 38
        echo "                    </tbody>

                </table>
            </div>
            <!-- table-responsive -->
            <div class=\"dataTables_paginate paging_full_numbers\">
                ";
        // line 44
        echo (isset($context["page"]) ? $context["page"] : null);
        echo "
                <!-- Row end -->
            </div>
        </div>
    </div>
</div>
<!-- contentpanel -->

";
    }

    // line 53
    public function block_script($context, array $blocks = array())
    {
        // line 54
        echo "<script>
    \$('.btn-del').click(function() {
        var url = \$(this).attr('data-url');
        //询问框
        layer.confirm('是否要删除这个文章？', {
            btn: ['确定', '取消'] //按钮
        }, function() {
            location.href = url;
        }, function() {

        });
    })
</script>
";
    }

    public function getTemplateName()
    {
        return "article/article.html";
    }

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  141 => 54,  138 => 53,  125 => 44,  117 => 38,  107 => 34,  103 => 33,  98 => 31,  94 => 30,  90 => 29,  86 => 28,  82 => 27,  79 => 26,  75 => 25,  58 => 11,  53 => 8,  50 => 7,  45 => 5,  42 => 4,  34 => 3,  30 => 1,  28 => 2,  11 => 1,);
    }

    /** @deprecated since 1.27 (to be removed in 2.0). Use getSourceContext() instead */
    public function getSource()
    {
        @trigger_error('The '.__METHOD__.' method is deprecated since version 1.27 and will be removed in 2.0. Use getSourceContext() instead.', E_USER_DEPRECATED);

        return $this->getSourceContext()->getCode();
    }

    public function getSourceContext()
    {
        return new Twig_Source("{% extends \"layout.html\" %}
{% set now_title = '文章管理'%} 
{% block web_title %}{{ now_title }}-{{ parent()}}{% endblock%}
{% block style%}
    <link href=\"/assign/admin/js/DataTables/css/data-table.css\" rel=\"stylesheet\">
{% endblock%}
{% block content%}
<div class=\"contentpanel\">
    <div class=\"row\">
        <div class=\"col-md-12\">
            <p class=\"mb20\">{{ now_title }}</p>
            <div class=\"table-responsive\">
                <table class=\"table mb30\">
                    <thead>
                        <tr>
                            <th>ID</th>
                            <th>文章标题</th>
                            <th>所属分类</th>
                            <th>是否显示</th>
                            <th>修改时间</th>
                            <th>操作</th>
                        </tr>
                    </thead>
                    <tbody>
                        {% for a in data %}
                        <tr>
                            <td>{{ a.id }}</td>
                            <td>{{ a.title }}</td>
                            <td>{{ a.cname }}</td>
                            <td>{{ a.is_use==0 ? '可用' : '不可用' }}</td>
                            <td>{{ a.updattime|date() }}</td>
                            <td class=\"table-action\">
                                <a href=\"/admin/article/infoarticle/id/{{ a.id}}\" title=\"編輯\"><i class=\"fa fa-pencil\"></i></a>
                                <a data-url=\"/admin/article/delarticle/id/{{ a.id}}\" href=\"javascript:;\" class=\"btn-del\" title=\"刪除\"><i class=\"fa fa-trash-o\"></i></a>
                            </td>
                        </tr>
                        {% endfor %}
                    </tbody>

                </table>
            </div>
            <!-- table-responsive -->
            <div class=\"dataTables_paginate paging_full_numbers\">
                {{ page| raw }}
                <!-- Row end -->
            </div>
        </div>
    </div>
</div>
<!-- contentpanel -->

{% endblock%} 
{% block script%}
<script>
    \$('.btn-del').click(function() {
        var url = \$(this).attr('data-url');
        //询问框
        layer.confirm('是否要删除这个文章？', {
            btn: ['确定', '取消'] //按钮
        }, function() {
            location.href = url;
        }, function() {

        });
    })
</script>
{% endblock%}", "article/article.html", "E:\\xampp\\htdocs\\app\\admin\\views\\article\\article.html");
    }
}
